package com.taomus.mytools.simplec.generate;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class AttributeTable implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private transient final static Map<Integer,AttributeTable> table = new HashMap<>();
	private WordEnum type;
	private int level;
	private long line;
	
	public void add(Token tk,AttributeTable attr){
		table.put(tk.hashCode(), attr);
	}
	
	public AttributeTable get(Token tk){
		return table.get(tk.hashCode());
	}

	public WordEnum getType() {
		return type;
	}

	public void setType(WordEnum type) {
		this.type = type;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public long getLine() {
		return line;
	}

	public void setLine(long line) {
		this.line = line;
	}
}
